package top.revery.account.utils;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import top.revery.account.dto.CompanyService;
import top.revery.account.dto.KolService;
import top.revery.account.dto.UserService;


import javax.annotation.PostConstruct;

/**
 * <h1> --- 服务访问映射 --- </h1>
 * Created by  revery.top jun
 * Date  2019-12-05 11:48
 */

@Component
public class FeignServiceMapping {

    /*
     * User Service
     * */
    public static UserService userService;
    public static KolService kolService;
    public static CompanyService companyService;



    @Component
    public class AutoLoadData {
        @Autowired
        private UserService userService;
        @Autowired
        private KolService kolService;
       @Autowired
        private CompanyService companyService;
        @PostConstruct
        void init() {
            FeignServiceMapping.userService = this.userService;
            FeignServiceMapping.kolService = this.kolService;
            FeignServiceMapping.companyService=this.companyService;
        }
    }
}
